#include "Shape.h"
#ifndef __BOX_H__
#define __BOX_H__

class ENGINE_API Box : public Shape
{
public:
	Box() : Shape() 
	{
		primitiveType = DrawPrimitives::TRIANGLE_STRIP;
		vertexs = new COL_VERTEX[4];
		if(vertexs == NULL) throw std::bad_alloc();

		vertexCount = 4;
	}

	~Box() { delete[] vertexs; }
	void resetVertexs() 
	{
		vertexs[0].x = ____MIN_V;
		vertexs[0].y = ____MIN_V;
		vertexs[0].z = 0;
		vertexs[0].rhw = 1.0f;

		vertexs[1].x = ____MAX_V;
		vertexs[1].y = ____MIN_V;
		vertexs[1].z = 0;
		vertexs[1].rhw = 1.0f;

		vertexs[2].x = ____MIN_V;
		vertexs[2].y = ____MAX_V;
		vertexs[2].z = 0;
		vertexs[2].rhw = 1.0f;

		vertexs[3].x = ____MAX_V;
		vertexs[3].y = ____MAX_V;
		vertexs[3].z = 0;
		vertexs[3].rhw = 1.0f;

	}


	virtual void Draw(Renderer* renderer)
	{
		Shape::Draw(renderer);
	}

};

#endif

/*
		vertexs[0].x = posX;
		vertexs[0].y = posY;
		vertexs[0].z = 0;
		vertexs[0].rhw = 1.0f;

		vertexs[1].x = posX + Width;
		vertexs[1].y = posY;
		vertexs[1].z = 0;
		vertexs[1].rhw = 1.0f;

		vertexs[2].x = posX;
		vertexs[2].y = posY + Height;
		vertexs[2].z = 0;
		vertexs[2].rhw = 1.0f;

		vertexs[3].x = posX + Width;
		vertexs[3].y = posY + Height;
		vertexs[3].z = 0;
		vertexs[3].rhw = 1.0f;
*/